import Mock from 'mockjs'
// import loginAPI from './login'
// import mbaAPI from './mbaCollege'

// 修复在使用 MockJS 情况下，设置 withCredentials = true，且未被拦截的跨域请求丢失 Cookies 的问题
// https://github.com/nuysoft/Mock/issues/300
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function() {
  if (this.custom.xhr) {
    this.custom.xhr.withCredentials = this.withCredentials || false
  }
  this.proxy_send(...arguments)
}

// Mock.setup({
//   timeout: '350-600'
// })

// 登录相关
// Mock.mock(/\/sys\/login/, 'post', loginAPI.loginByUsername)
// Mock.mock(/\/sys\/logout/, 'post', loginAPI.logout)
// Mock.mock(/\/sys\/user\/info\.*/, 'get', loginAPI.getUserInfo)
//
// // mba院校相关
// Mock.mock(/\/getSchoolList/, 'get', mbaAPI.getSchoolList)
// Mock.mock(/\/getSchoolDetailInfo/, 'get', mbaAPI.getSchoolDetailInfo)
// Mock.mock(/\/getSchoolLoglist/, 'get', mbaAPI.getSchoolLoglist)
// Mock.mock(/\/saveSchool/, 'post', mbaAPI.saveSchool)
// Mock.mock(/\/getProj1st2nd/, 'get', mbaAPI.getProj1st2nd)

export default Mock
